﻿@model CompanyManagementDLL.MetaData.TaskMetaData

@{
    ViewBag.Title = "Add Task";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="row">
    <div class="col-md-6">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">Add Task</h3>
            </div>
            <form method="post">
                <div class="box-body">
                    <div style="color: red">
                        <b>@Html.ValidationSummary()</b>
                    </div>
                    <div class="form-group">
                        <label>Task Name</label>
                        @Html.TextBoxFor(model => model.TaskName, new { @class = "form-control", @placeholder = "Enter Task Name" })
                    </div>
                    <div class="form-group">
                        @{
                            var modulelist=new CompanyManagementDLL.CompanyMgtEntities().Modules.Where(m => m.IsActive == true && m.IsArchive == false).ToList();
                            
                            }
                        <label>Module Name</label>
                        @Html.DropDownListFor(model => model.ModuleID,new SelectList(modulelist,"ModuleID","ModuleName"),"--- Select Module ---", new { @class = "form-control", style = "width:32%"  })
                    </div>
                    <div class="form-group">
                        <label>Estimated Hours</label>
                        @Html.EditorFor(model => model.EstimatedHours)
                    </div>
                    <div class="checkbox">
                        <label class="">
                            <div class="icheckbox_minimal" style="position: relative;" aria-checked="false" aria-disabled="false">
                                @Html.CheckBoxFor(u => u.IsActive, new { style = "position: absolute; opacity: 0;" })
                                <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: none repeat scroll 0% 0% rgb(255, 255, 255); border: 0px none; opacity: 0;"></ins>
                            </div>
                            Is Active
                        </label>
                    </div>
                </div>
                <div class="box-footer">
                    <button class="btn btn-primary" type="submit">Submit</button>
                    <a class="btn btn-danger" href="@Url.Action("Index", "Task")"><i class="fa fa-arrow-left"></i>Cancel</a>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    $("#pagetitle").html("Task");
</script>
